
#ifndef MANEJADORDEARBOLES_H_
#define MANEJADORDEARBOLES_H_
#include "ArbolHuffman.h"
#include "BitHandlerOutput.h"
#include "BitHandlerInput.h"

class ManejadorDeArboles {
private:
  ArbolHuffman arboles[256];
  ArbolHuffman longitudes;
  BitHandlerInput *bhi;
  BitHandlerOutput *bho;
  void emitir8bits(unsigned int c);
public:
	ManejadorDeArboles();
	virtual ~ManejadorDeArboles();
	void setBitHandlerInput(BitHandlerInput& bithi);
	BitHandlerInput* getBitHandlerInput();
	BitHandlerOutput* getBitHandlerOutput();
	void setBitHandlerOutput(BitHandlerOutput&bitho);
	void emitirCaracter(unsigned char caracter);
	void emitirCaracter(unsigned char caracter, unsigned char contexto);
	void emitirLongitud(unsigned char longitud);
	unsigned int obtenerCaracter();
	unsigned int obtenerCaracter(unsigned char contexto);
	unsigned int obtenerLongitud();
	unsigned int leer8bits();
};

#endif /* MANEJADORDEARBOLES_H_ */
